#include<bits/stdc++.h>

using namespace std;

int main() {
	vector<int> a={3,2,1};//123
	int y=9;
	for(int i=0;i<a.size();i++){
		a[i]*=y;
	}
	int cs=0;
	for(int i=0;i<a.size();i++){
		int temp=a[i]+cs;
		cs=temp/10;
		a[i]=temp%10;
	}
	while(cs>0){
		a.push_back(cs%10);
		cs/=10;
	}
	copy(a.rbegin(),a.rend(),ostream_iterator<int>(cout," "));
	
	return 0;
}
